package com.example.dell.ssm.presenter;

import com.example.dell.ssm.contract.MainContract;
import com.example.dell.ssm.model.bean.ResponseBean;
import com.jaydenxiao.common.baserx.RxSubscriber;

/**
 * Created by dell on 2017/6/12.
 */

public class MainPresenter extends MainContract.Presenter {
    @Override
    public void getRegister(String name, String password) {
        mModel.register(name, password).subscribe(new RxSubscriber<ResponseBean>(mContext,true) {
            @Override
            protected void _onNext(ResponseBean responseBean) {
                mView.stopLoading();
                mView.returnRegister(responseBean);
            }

            @Override
            protected void _onError(String message) {
            }
        });
    }
}
